package cn.cs.client;
import cn.cs.common.Page;
import cn.cs.fallback.CsProductClientFallBack;


import java.util.List;
import java.util.Map;

import cn.cs.config.CsConfiguration;
import cn.cs.pojo.CsProduct;
import cn.cs.vo.DmFloorItems;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestBody;
/**
* Created by yuexl
*/
@FeignClient(name = "cs-item-provider", configuration = CsConfiguration.class, fallback = CsProductClientFallBack.class)
public interface RestCsProductClient {

    @RequestMapping(value = "/getCsProductById",method = RequestMethod.POST)
    public CsProduct getCsProductById(@RequestParam("id") Long id)throws Exception;

    @RequestMapping(value = "/getCsProductListByMap",method = RequestMethod.POST)
    public List<CsProduct>	getCsProductListByMap(@RequestBody Map<String, Object> param)throws Exception;

    @RequestMapping(value = "/getHotCsProductList", method = RequestMethod.POST)
    public List<CsProduct> getHotCsProductList(@RequestBody Map<String, Object> param) throws Exception;

    @RequestMapping(value = "/getCsProductCountByMap",method = RequestMethod.POST)
    public Integer getCsProductCountByMap(@RequestBody Map<String, Object> param)throws Exception;

    @RequestMapping(value = "/addCsProduct",method = RequestMethod.POST)
    public Integer addCsProduct(@RequestBody CsProduct csProduct)throws Exception;

    @RequestMapping(value = "/modifyCsProduct",method = RequestMethod.POST)
    public Integer modifyCsProduct(@RequestBody CsProduct csProduct)throws Exception;

    @RequestMapping(value = "/getCsProductListByMapForEs",method = RequestMethod.POST)
    public List<CsProduct> getCsProductListByMapForEs(@RequestParam Map<String, Object> param) throws Exception;

    @RequestMapping(value = "/queryCsProductPage",method = RequestMethod.POST)
    public Page<CsProduct> queryCsProductPage(@RequestParam Map<String, Object> param) throws Exception;

    @RequestMapping(value = "/getProductSaleCountById",method = RequestMethod.POST)
    public int getProductSaleCountById(@RequestParam("id") String id)throws Exception;



}
